//
//  LotteryView2.m
//  K8彩票
//
//  Created by zhoubo on 2017/6/7.
//  Copyright © 2017年 zhoubo. All rights reserved.
//

#import "LotteryView2.h"
#import "TimeLabel.h"


@interface LotteryView2 ()
@property (weak, nonatomic) IBOutlet UIImageView *imgView;
@property (weak, nonatomic) IBOutlet UILabel *titlelabel;
//@property (weak, nonatomic) IBOutlet TimeLabel *timelabel;




@end

@implementation LotteryView2


-(instancetype)initWithCoder:(NSCoder *)aDecoder
{
    if (self = [super initWithCoder:aDecoder]) {
//        if ([UIScreen mainScreen].bounds.size.width <375) {
//            self.titlelabel.font = [UIFont systemFontOfSize:15];
//        }
//        CGFloat height = self.imgView.frame.size.height;
//        self.imgView.layer.cornerRadius = height/2;
//        self.imgView.layer.masksToBounds = YES;
//        
//        self.imgView.image = [UIImage imageNamed:self.model.imgName];
//        self.titlelabel.text = self.model.title;
    }
    return self;
}


//-(void)layoutSubviews
//{
//
//    
//
//    
//}

-(void)awakeFromNib
{
    

    [super awakeFromNib];
    if ([UIScreen mainScreen].bounds.size.width <375) {
        self.titlelabel.font = [UIFont systemFontOfSize:15];
    }
    CGFloat height = self.imgView.frame.size.height;
    self.imgView.layer.cornerRadius = height/2;
    self.imgView.layer.masksToBounds = YES;
    
    self.imgView.image = [UIImage imageNamed:self.model.imgName];
    self.titlelabel.text = self.model.title;

    
}


-(void)setModel:(LotteryModel *)model
{
    _model = model;
    self.titlelabel.text = model.title;
    self.imgView.image = [UIImage imageNamed:model.imgName];
    
//    self.timelabel.text = [NSString stringWithFormat:@"%02ld:%02ld",self.model.timeCount/60,self.model.timeCount%60];
}





@end
